โ– humdrum codex / glint v1.0.2
license AGPL-3.0
4.3 KB raw
id
TASK-021
title
PDF / printable export in the house style
status
๐ŸŸข In progress
assignee
created_date
2026-06-29 20:49
updated_date
2026-06-30 00:21
labels
feature, release-1
dependencies
priority
medium
ordinal
21000

Description

Add a glint command/keybind to export the current document as a clean, printable PDF (or print-ready HTML) in the AppKit house style โ€” matching what _shared-app-kit/markdown-doc-kit already produces for the browser.

Reuse that kit as the source of truth rather than reinventing styling: it has doc.css (tokens, the seven themes โ€” flexoki/-dark, uchu/-dark, humdrum/-dark, eink โ€” document typography, and the @media print rules), embedded fonts (Awke, Untitled Sans, Name Mono), and pagination conventions (opening '# Title' becomes a centered cover page; every '## Section' starts a new page; '{.page-break}' forces a break; US Letter, 1in margins; print collapses to black-on-white).

Approach options to decide during design:

Out of scope: reimplementing the kit's interactive features (checkbox toggle, drag reorder) in glint.

Acceptance Criteria

Implementation Notes

Portability constraint (user): glint is installed by people who are NOT on this machine and do NOT have the kit's bundled fonts (Awke, Untitled Sans, Name Mono โ€” personal/licensed). So the export must NOT hard-embed those. Fonts must be user-configurable (display/body/mono config keys, reusing the doc.css --font-* tokens) with safe open/system fallbacks (e.g. Georgia / system-ui / ui-monospace) so output looks fine with zero personal assets. Only redistributable fonts may be embedded by default.

Packaging: glint must be self-contained. Copy/build the required kit pieces (doc.css + the @media print rules, the render HTML skeleton, only redistributable fonts) into the glint repo (e.g. internal/export/assets/) and embed them with go:embed so they ship inside the binary. Do NOT depend on /Users/kortum/Developer/Home/_shared-app-kit/markdown-doc-kit at runtime โ€” that path doesn't exist on users' machines. Decide a vendor/sync story (a script that re-copies from the kit on update, or a one-time fork) so the embedded copy can be refreshed when the kit's house style changes; strip the licensed Awke/Untitled Sans/Name Mono @font-face blocks during that copy, leaving the --font-* tokens + fallbacks (ties to the configurable-fonts AC).